// pages/detail/detail.js
const DetailModel=require("../../models/DetailModel")
Page({
  data: {
   hotSongs:[],
  },
   onLoad(options) {
    var {id}=options;
    DetailModel.getArtist(id).then(res=>{
       var {artist,hotSongs}=res.data;
       var ids=artist.id;
       DetailModel.getSongs(ids).then(res=>{
           var {hotAlbums}=res.data;
           this.setData({
              hotAlbums
            })
        });
      this.setData({
        artist,
        hotSongs
      })
   });
  },
})